using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows;

namespace Faust.Andrew.MTG.Player.Converters
{
    public class NotificationTypeToBrushConverter : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value is Shared.NotificationType)
            {
                Shared.NotificationType notificationType = (Shared.NotificationType)value;
                switch (notificationType)
                {
                    case Faust.Andrew.MTG.Player.Shared.NotificationType.Message:
                        return new SolidColorBrush(Colors.Blue);
                    case Faust.Andrew.MTG.Player.Shared.NotificationType.Notification:
                        return new SolidColorBrush(Colors.White);
                    case Faust.Andrew.MTG.Player.Shared.NotificationType.PriorityNotification:
                        return new SolidColorBrush(Colors.Red);
                    default:
                        return new SolidColorBrush(Colors.White);
                }                
            }
            else
            {
                return new SolidColorBrush(Colors.Transparent);
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
